<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />

		<link rel="stylesheet" href="http://127.0.0.1/vancl_php/Static/css/hdjs.css" />
		<link rel="stylesheet" href="http://127.0.0.1/vancl_php/Application/Index/View/css/style.css" />
		<link rel="stylesheet" href="http://127.0.0.1/vancl_php/Application/Index/View/css/commonjs.css" />
		<link rel="stylesheet" href="http://127.0.0.1/vancl_php/Application/Index/View/css/details.css" />
		<link rel="stylesheet" href="http://127.0.0.1/vancl_php/Application/Index/View/css/index.css" />
		<script src="http://127.0.0.1/vancl_php/Static/js/jquery-1.7.2.min.js"></script>
		<script src="http://127.0.0.1/vancl_php/Static/js/hdjs.min.js"></script>
		<script type="text/javascript">
			var ajaxStock = "<?php echo U('ajaxStock');?>";
			var ajaxCart = "<?php echo U('Cart/addCart');?>";
			var showCart = "<?php echo U('Cart/ajaxGoods');?>";
			var app = "<?php echo U('Details/index');?>";
			var delCart = "<?php echo U('Cart/delCart');?>";
			var root = "http://127.0.0.1/vancl_php/";
			var loading = "http://127.0.0.1/vancl_php/Static/Img/loading.gif";
			var ajaxQa = "<?php echo U('ajaxQa');?>";
			var ajaxComm = "<?php echo U('ajaxComm');?>";
			var gid = "<?php echo $hd['get']['gid'];?>";
		</script>
		<script type="text/javascript" src="http://127.0.0.1/vancl_php/Application/Index/View/js/addCart.js"></script>
		<script type="text/javascript" src="http://127.0.0.1/vancl_php/Application/Index/View/js/ajaxGoodsNum.js"></script>
		<script src="http://127.0.0.1/vancl_php/Application/Index/View/js/magnifier.js"></script>
		<script src="http://127.0.0.1/vancl_php/Static/js/common.js"></script>
		<script src="http://127.0.0.1/vancl_php/Application/Index/View/js/showCart.js"></script>
		<script type="text/javascript" src="http://127.0.0.1/vancl_php/Application/Index/View/js/ajaxPage.js"></script>
		<link rel="stylesheet" href="http://127.0.0.1/vancl_php/Static/css/animate.css" />
		<script type="text/javascript">
			$(function(){
				var islogin = 0;
				$('.imgList li').mouseenter(function(){
					var index = $(this).index();
					//显示中图
					$('.smallImg').find('img').eq(index).show().siblings('img').hide();
					//显示大图
					$('.rightImg').find('img').eq(index).show().siblings('img').hide();
				});
				
				$('.proShow').find('img').css({'display':'inline'});
				
				//先判断是否登陆
					$.ajax({
						url:"<?php echo U('ajaxIsLogin');?>",
						dataType:'json',
						type:'get',
						success:function(phpData){
							if(phpData.status){
								islogin = 1;
								
							}else{
								islogin = 0;
							}
						}
					})
				
				
				//qaBtn 判断是否登陆
				$('#qaBtn').live('click',function(){
					if(islogin){
						$('.qaform').show();
					}else{
						hd_alert({
									message:'您还未登陆,请先登陆',
									timeout:3
								})
					}
					})
					
				
				
				//提交要提问的内容
				$('#dosubmit').click(function(){
					//先判断是否登陆
					if(islogin){
						var questcontent = $('#questcontent').val();
						if(!questcontent){
							hd_alert({
								message:'请输入要提问的内容',
								timeout:3
							});
							return false;
						}
						var data = $('#questfrom').serialize();
						//如果登陆后那么将提问的内容发送到php端
						$.ajax({
							url:"<?php echo U('addQeust');?>",
							data:data,
							dataType:'json',
							type:'post',
							success:function(phpData){
								if(phpData.status){
									hd_alert({
										message:phpData.message,
										timeout:3
									})
									$('.qaform').hide();
								}else{
									hd_alert({
										message:phpData.message,
										timeout:3
									})
								}
							}
							
						})
					}else{
						hd_alert({
							message:'您还没有登陆',
							timeout:3
						})
					}
				})
				/**
				 * ajax提交一个评论
				 */
				$('#commentsubmit').click(function(){
					var data = $('#commform').serialize();
					$.ajax({
						url:"<?php echo U('Comment/addComment');?>",
						data:data,
						type:'post',
						dataType:"json",
						beforeSend :function(){
							$('#commform').parents('div').html('提交中<img src="http://127.0.0.1/vancl_php/Static/Img/loading.gif" />');
						},
						success:function(phpData){
							if(phpData.status){
								hd_alert({
									message:phpData.message,
									timeout:3
								});
								var str = '<div class="commentDesc"><div class="leftStr"><div class="commentStr">';
								    str += '<p>'+phpData.data.gc_content+'</p>';
									str += '<p class="time">';
									str += phpData.data.gc_time;
									str += '</p></div></div><div class="rightType"><ul>';
									str += '<li>颜色：'+phpData.data.combinestr[0]+'</li>';
									str += '<li>尺码：'+phpData.data.combinestr[1]+'</li>';
									str += '<li>身高：'+phpData.data.gc_height+'cm</li>';
									str += '<li>体重：'+phpData.data.gc_weight+'kg</li>';
									str += '<li class="isok">';
									str += '<'+phpData.data.gc_tag+'></li></ul></div>';
									str += '<div class="member"><p>';
									str += '<a href="javascript:;" class="username">';		
									str += phpData.data.username + '<span class="vipIcon"></span>';
									str += '</a></p></div></div>';
									$('.comments').prepend(str);
									$('#commentBox').addClass('animated fadeOutUp');
							}else{
								hd_alert({
									message:phpData.message,
									timeout:3
								})
							}
						}
					})
				})
				/**
				 *  关闭评论窗口 
				 */
				$('#closewindow').click(function(){
					$('#commentBox').addClass('fadeOutUp',function(){
						$(this).hide();
					});
				})
				/**
				 * 判断用户是否购物了此件商品如果购买那么才让用户评论否则 不给评论
				 */
				$('#commentBtn').click(function(){
					//如果登陆过了再判断是否已经评论过
					if(islogin){
						$.ajax({
							url:"<?php echo U('Comment/isBuyComm');?>",
							data:{gid:'<?php echo $hd['get']['gid'];?>'},
							dataType:'json',
							type:'get',
							success:function(phpData){
								if(phpData.status){
									$('#commentBox').show();
									$('#commentBox').removeClass('fadeOutUp');
									$('#commentBox').addClass('fadeInUp');
								}else{
									hd_alert({
										message:phpData.message,
										timeout:3
									})
								}
							}
					})
					}else{
						hd_alert({
							message:'您还未登陆,请先登陆',
							timeout:3
						})
					}
					
				})
				
				
			})
		</script>

		<style>
			.nothot{
				color:#727171 !important;
			}
			table{
        		font-size:14px;
        		color:#555;
        		text-align: right;
        		margin:0 auto;
    		}
    		h3{
    			font-size:13px;
    			color:#B1B1B1;
    		}
		</style>
		<title><?php echo $goods['goods']['goods_name'];?></title>
	</head>

	<body>
		<!-- 头部开始  -->
		<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<div id="header">
	<script type="text/javascript">
		var getgoods = "<?php echo U('Index/getGoodsName');?>";
		var search = "<?php echo U('Search/index');?>";
		var showlist = "<?php echo U('List/index');?>";
	</script>
			<!-- 头部广告位置 -->
			<div class="adWrap">
				<div class="headAd">
					<a href="">
						<img src="http://127.0.0.1/vancl_php/Application/Index/View/Img/head_top_ad.jpg" alt="头部广告位" />
					</a>
				</div>
				<!-- 头部广告位置结束 -->
			</div>
			<!--头部登陆信息开始-->
			<div class="toptopare">
				<div class="arewarp">
					<!--左边欢迎登陆文字开始-->
						<div class="welcome">
							    <?php if(isset($hd['session']['uid'])){ ?>
								 您好！
							 <a href="<?php echo U('UserInfo/index');?>" style="color:#B81B22;font-weight: 700;"><?php echo $hd['session']['username'];?></a>
							 <a href="<?php echo U('Login/loginout');?>" style="color:#B81B22;">退出登录</a>
							<?php }else{ ?>
							您好,欢迎光临凡客诚品！
							<span class="loginreg">
								<a href="<?php echo U('Login/index');?>">登陆</a>
								｜ 
								<a href="<?php echo U('Register/index');?>">注册</a>
							</span>
							<?php } ?>
						</div>
					<!--左边欢迎登陆文字结束-->
					<!--订单收藏-->
						<div class="orderads">
							<a href="<?php echo U('UserInfo/orderList');?>">我的订单</a>
								 
							<a href="">收藏本站</a>
						</div>
					<!--订单收藏结束-->
					<!-- 右边下拉列表-->
					<div class="droplist">
						<div href="" id="myVancl" class="mylist">
							<a href="">我的凡客 <span class="jt"></span></a>
							<ul class="myVanclList">
								<li><a href="">我的订单</a></li>
								<li class="liBottom"><a href=""></a></li>
							</ul>
						</div>
						<div href="" class="mylist">
							<a href="">网站导航 <span class="jt"></span></a>
							<ul class="myVanclList">
								<li><a href="">我的订单</a></li>
								<li class="liBottom"><a href=""></a></li>
							</ul>
						</div>
						<div href="" class="mylist">
							<a href="">帮助中心 <span class="jt"></span></a>
							<ul class="myVanclList">
								<li><a href="">购物指南</a></li>
								<li><a href="">配送方式</a></li>
								<li><a href="">支付方式</a></li>
								<li><a href="">售后服务</a></li>
								<li><a href="">投诉建议</a></li>
								<li><a href="">在线客户</a></li>
								<li class="liBottom"><a href=""></a></li>
							</ul>
						</div>
						<div href="" class="mylist">
							<a href="">网站公告 <span class="jt"></span></a>
							<ul class="myVanclList">
								<li><a href="">我的订单</a></li>
								<li class="liBottom"><a href=""></a></li>
							</ul>
						</div>
					</div>
					<!--右边下拉列表结束-->
				</div>
			</div>
			<!--头部登陆信息结束-->
			<!--logo和搜索条-->
			<div class="logoArea">
				<!--logo-->
				<a href="<?php echo U('Index/index');?>" class="logo"></a>
				<!--logo结束-->
				<!--搜索区开始-->
				<div class="serachArea">
					<div class="searchTopAre">
					<!--搜索框-->
					<div class="searchInput">
						<form action="<?php echo U('Search/index');?>" method="get">
							<input type="text" name="searchkey" autocomplete="off" id="inputBox"/>
							<div class="inputbox" >
							</div>
							<input type="submit" id="searchBtn" value="搜索" />
						</form>
					</div>
					<!--购物车-->
					<div class="shopCart">
						<a href="<?php echo U('Cart/index');?>" style="color:white">购物车</a>(<span class="carNum">    <?php if(isset($hd['session']['cart']['total_rows'])){ ?><?php echo $hd['session']['cart']['total_rows'];?><?php }else{ ?>0<?php } ?></span>)
						<div class="showCartList">
							<!--目前没有商品-->
							<p class="cartTitle">最近加入购物车</p>
							<ul>
								
							</ul>
							<!--购物车底部-->
							<div class="cartBottom">
								<div class="left">
									共计
									<p>￥0.00元</p>
								</div>
								<!--右边进入详细购物车页-->
								<div class="right">
									<a href="<?php echo U('Cart/index');?>">查看购物车</a>
								</div>
							</div>
						</div>
					</div>
					<!--购物车结束-->
					</div>
					<!--热门搜索-->
					<div class="hotKeyword">
						<!--<span>热门搜索:</span>
						<a href="">吉武国</a>
						<a href="">T恤</a>
						<a href="">卡其裤</a>
						<a href="">长场雄</a>
						<a href="">POLO</a>
						<a href="">麻牛仔</a>
						<a href="">皮肤衣</a>
						<a href="">牛津纺</a>-->
					</div>
					<!--热门搜索结束-->
					
					<!--搜索框结束-->
				</div>
				<!--搜索区结束-->
			</div>
			<!--logo和搜索条结束-->
			<!--导航区-->
			<div id="navbar" style="position:relative;">
				<div class="navFirst" >
					全部商品分类
					
					<!--下拉菜单 -->
					<div class="dropLists" style="text-align: left;">
					
						<?php foreach ($rightCateTree as $key=>$val){?>
						<dl>
							<span><?php echo $val['cname'];?></span>
							<?php foreach ($val['son'] as $k=>$v){?>	
							    <?php if($k==0){ ?>
								<dd>
							<?php }else{ ?>
								<dd class="otherCate">
							<?php } ?>
								<p>
									<a href="http://127.0.0.1/vancl_php/index.php/Index/List/index/cid/<?php echo $v['cid'];?>"><?php echo $v['cname'];?></a>
								</p>
								
								<p class="sonCate">
									<?php foreach ($v['son'] as $ky=>$vl){?>
										<a href="http://127.0.0.1/vancl_php/index.php/Index/List/index/cid/<?php echo $vl['cid'];?>"     <?php if($vl['is_hot']==1){ ?>class="hot"<?php }else{ ?>class="nothot"<?php } ?> ><?php echo $vl['cname'];?></a>
									<?php }?>
								</p>
														
							</dd>
							<?php }?>
							</dl>
    					<?php }?>
    					
					</div>
					<!--下拉菜单 -->
					<span class="downArrowTop"></span>
				</div>
				<div class="navList" >
					<ul>
						<?php foreach ($topCate as $key=>$val){?>
						<li><a href="<?php echo U('List/index',array('cid'=>$val['cid']));?>" title=<?php echo $val['ckeywords'];?>><?php echo $val['cname'];?></a>
							<!--当前这个分类下页推荐的2个商品-->
							<div class="cateProduct">
								<!--分页推荐商品左边-->
								<?php foreach ($val['son'][0] as $kk=>$vv){?>
								<div class="productLeft"     <?php if($kk==1){ ?>style="border:none;"<?php } ?>>
									<div class="wrapProduct">
										<a href="http://127.0.0.1/vancl_php/index.php/Index/Details/index/gid/<?php echo $vv['gid'];?>">
											<img src="http://127.0.0.1/vancl_php/<?php echo $vv['goods_listimg'];?>" alt="" width="140" height="140" />
										</a>
										<p class="goods">
											<a href="http://127.0.0.1/vancl_php/index.php/Index/Details/index/gid/<?php echo $vv['gid'];?>"><?php echo hd_substr($vv['goods_name'],8,'');?></a>
										</p>
										<div class="goodsDesc">
											<p class="goodsPrice" style="margin-top:50px;margin-left:20px;">
											￥<?php echo $vv['shop_price'];?>
											</p>
										</div>
										
									</div>
								</div>
								<?php }?>
							</div>
						</li>
						<?php }?>
					</ul>
				</div>
			</div>
			<!--导航区结束-->
		</div>
		<!-- 头部结束  -->
		<!-- 头部结束  -->

		<!--内容-->
		<div id="content">
			<div class="title">
				<div class="mbx">
					<a href="<?php echo U('Index/index');?>">首页</a> >
					<?php foreach ($mbx as $mk=>$mv){?>
						<a href="<?php echo U('Category/index',array('cid'=>$mv['cid']));?>"><?php echo $mv['cname'];?></a> >
					<?php }?>
					<span style="color:#B81B22"><?php echo $goods['goods']['goods_name'];?></span>
				</div>
				<!--商品标题-->
				<div class="proTitle">
					<div class="left">
						<h1>

			 			<?php echo $goods['goods']['goods_name'];?>

			 			

			 			</h1>
					</div>
					<div class="right">
						<a href="#proShow">产品描述</a>
						<a href="#commentCenter">评论</a>
						<a href="#qa" style="border:none;">提问</a>
					</div>
				</div>
				<!--商品标题结束-->
			</div>
			<!--商品区-->
			<div class="proArea">
				<!--左边图片展示区-->
				<div class="left">
					<div class="imgList">
						<span class="arrow">

							<!--<a href="" class="upArrow"></a>-->

						</span>
						<ul>
							<?php foreach ($goods['details']['smallimg'] as $gimgk=>$gimg){?>
								<li class="active">
									<img src="http://127.0.0.1/vancl_php/<?php echo $gimg;?>" alt="" />
								</li>
							<?php }?>

						</ul>
						<span class="arrow">

							<!--<a href="" class="downArrow"></a>-->

						</span>
					</div>
					<!--大图展示区-->
					<div class="bigImg" style="position: relative;">
						<!--放大镜中的小图-->
						<div class="smallImg">
							<!--放大镜图层-->
							<div class="layer"></div>
							<!--放大镜图层结束-->
							<div class="box"></div>
							<?php foreach ($goods['details']['mediumimg'] as $mimk=>$mimg){?>
								    <?php if($mimk==0){ ?>
									<img src="http://127.0.0.1/vancl_php/<?php echo $mimg;?>" alt="" />
									<?php }else{ ?>
									<img src="http://127.0.0.1/vancl_php/<?php echo $mimg;?>" alt="" style="display:none;" />
								<?php } ?>
							<?php }?>
						</div>
						<!--大图片-->
						<div class="rightImg">
							<?php foreach ($goods['details']['bigimg'] as $bimk=>$bimg){?>
								    <?php if($bimk==0){ ?>
									<img src="http://127.0.0.1/vancl_php/<?php echo $bimg;?>" alt="" />
									<?php }else{ ?>
									<img src="http://127.0.0.1/vancl_php/<?php echo $bimg;?>" alt="" style="display:none;" />
								<?php } ?>
							<?php }?>
						</div>
						<!--大图片结束-->
					</div>
					<!--大图展示区-->
				</div>
				<!--左边图片展示区结束-->
				<!--右边价格区-->
				<div class="right">
					<div class="priceArea">
						<!--商品价格-->
						<div class="priceTitle">
							<p>
								售价：￥<span><?php echo $goods['goods']['shop_price'];?></span>
							</p>
						</div>
						<!--商品颜色-->

						    <?php if($goods['goods']['goods_count']){ ?>
							<?php foreach ($goods['goodsspec']['_attrname'] as $key=>$val){?>
								<div class="proColor">
									<span style="float:left"><?php echo $val;?>：</span>
									<div class="colorThumb">
										<ul>
											<?php foreach ($goods['goodsspec'] as $kk=>$vv){?>
												    <?php if($vv['attrname']==$val){ ?>
													<li value="<?php echo $vv['attid'];?>"><span class="proName"><?php echo $vv['attr_value'];?></span><span class="arrow"></span>
													</li>
												<?php } ?>
											<?php }?>
										</ul>
									</div>
								</div>
							<?php }?>
							<div class="proMsg" style="margin-top:30px;">
							</div>
							<!--商品尺码-->
							<!--<div class="proSize">
							<span>尺码：</span>
							<ul>
								<li data-size="s">S</li>
								<li data-size="s">M</li>
								<li data-size="s">L</li>
								<li data-size="s">XL</li>
							</ul>
						</div>-->
							<!--数量-->

							<div class="proCount">
								<form action="javascript:;" method="post" id="buy">
									<input type="hidden" name="price" value="<?php echo $goods['goods']['shop_price'];?>" />
									<span>数量：</span>
									<!--购买数量-->
									<select name="goodscount" id="">
										<option value="1">1</option>
										<option value="2">2</option>
										<option value="3">3</option>
										<option value="4">4</option>
										<option value="5">5</option>
										<option value="6">6</option>
										<option value="7">7</option>
										<option value="8">8</option>
										<option value="9">9</option>
										<option value="10">10</option>

									</select>
							</div>
							<!--已选-->
							<div class="currentSelect">
								<span>已选：</span>
								<strong></strong>
								<strong class="isStork">总库存<?php echo $goods['goods']['goods_count'];?></strong>
							</div>
							<!--按钮组-->
							<div class="btnArea">
								<!--<form action="<?php echo U('Cart/shopConfirm');?>" method="post" >-->
								<input type="hidden" name="goodsname" value="<?php echo $goods['goods']['goods_name'];?>" />
								<input type="hidden" name="combine" value="" />
								<input type="hidden" name="combinestr" value="" />
								<input type="hidden" name="goodsimg" value="<?php echo $goods['goods']['goods_listimg'];?>" />
								<input type="hidden" name="gid" value="<?php echo $goods['goods']['gid'];?>" />
								<!--<input type="submit" value="立即购买" id="nowBuy" />-->

								<a href="javascript:;" id="addCart"></a>
								</form>

								<div class="cartMsg">
									<p class="msgtitle">
										<span class="titleleft">商品已成功放入购物车</span>
										<span class="titleright"></span>
									</p>
									<div class="cartcontent">
										<div class="contentleft">
											<p class="lefticon"></p>
											<div class="lefttext">
												<div class="top">
													共有<span class="count"></span>件商品
												</div>
												<div class="bottom">
													总计<span class="countmoney"></span>元
												</div>
											</div>
										</div>
										<div class="contentright">
											<div class="keepshop">
												<a href="javascript:;">
													<<继续购物</a>
											</div>
											<div class="gocart">
												<a href="<?php echo U('Cart/index');?>">去购物车>></a>
											</div>
										</div>
									</div>
								</div>
							</div>
							<?php }else{ ?>
							<div>【对不起此商品目前缺货^_^】</div>
						<?php } ?>
						<!--提示-->
						<!--<div class="prompt">
							<p>
								<strong>优惠提示</strong>
							</p>
							<ul>
								<li style="list-style-type: ;">
									此款参与购物满199元免运费活动 
								</li>
							</ul>
						</div>-->
					</div>
				</div>
				<!--右边价格区-->
				<!--产品展示区-->
				<div class="proShow" name="desc" id="proShow">
					<!--产品描述-->
					<!--<div class="desc">
						<h4>
							产品描述：
						</h4>
						<p>
							100%全棉青年布面料，款式复刻经典二战美军舰艇机械师工装款，采用美棉（孟菲斯州），竹节纱的加入，既保留了面料适度的粗糙质感，亦适合打造春夏清爽造型。修身版型，每个细节都以毫米为单位调整，更加适合外穿。靛蓝染料的独特褪色效果是其魅力所在。 
						</p>
					</div>-->
					<!--产品属性-->
					<div class="proProperty">
						<h4>

							产品属性：(点击属性可查看同类商品)

						</h4>
						<!--属性列表-->
						<div class="proList">
							<ul>
								<?php foreach ($goods['goodsattr'] as $ak=>$avl){?>
									<li><span><?php echo $avl['attrname'];?>：</span><?php echo $avl['attr_value'];?></li>
								<?php }?>

							</ul>
						</div>
					</div>
					<!--洗涤说明-->
					<!--<div class="washMan">
						<h4>	
							洗涤说明：
						</h4>
						<ul>
							<li class="washImg1"></li>
							<li class="washImg2"></li>
							<li class="washImg3"></li>
							<li class="washImg4"></li>
							<li class="washImg5"></li>
							<li class="washImg6"></li>
						</ul>
					</div>-->
					<?php echo $goods['details']['intro'];?>

				</div>
				<!--产品展示区结束-->
			</div>
			<!--商品区结束-->
			<!--商品评论区-->
			<div class="comment">
				<div class="hotPro fr">
					<h4>

						热销商品

					</h4>
					<ul>
						<?php foreach ($hotgoods as $hk=>$hgoods){?>
							<li>
								<a href="<?php echo U('Details/index',array('gid'=>$hgoods['goods_gid']));?>">
									<img src="http://127.0.0.1/vancl_php/<?php echo $hgoods['goods_listimg'];?>" width="160" height="160" alt="" />
								</a>
								<div class="proTitle">
									<p class="proName"><a href="<?php echo U('Details/index',array('gid'=>$hgoods['goods_gid']));?>"><?php echo hd_substr($hgoods['goods_name'],14,'');?></a>
									</p>
									<a href="" class="proPrice">售价￥<?php echo $hgoods['shop_price'];?> </a>
								</div>
							</li>
						<?php }?>
					</ul>
				</div>
				<!--评论中心-->
				<div class="commentCenter" id="commentCenter">
					<h4 class="title">最新评论(共<span class="commCount"><?php echo $total2;?></span>条)</h4>
					<!--评论标签-->
					<div class="top">
						
						<!--评论按钮-->
						<div class="commentBtn">
							<a href="javascript:;" id="commentBtn">我要评论</a>
						</div>
					</div>
					<!--评论内容-->
					<div class="clearfix"></div>
					<!--评论内容-->
					<div class="comments">
						<!--评论内容-->
						    <?php if($comments){ ?>
						<?php foreach ($comments as $ck=>$cv){?>
						<div class="commentDesc">
							<!--左边字符串-->
							<div class="leftStr">
								<div class="commentStr">
									<p><?php echo $cv['gc_content'];?></p>
									<p class="time">
										<?php echo $cv['gc_time'];?>
									</p>
								</div>
							</div>
							<!--右边购买的型号-->
							<div class="rightType">
								<ul>
									<li>颜色：<?php echo $cv['combinestr']['0'];?></li>
									<li>尺码：<?php echo $cv['combinestr']['1'];?> </li>
									<li>身高：<?php echo $cv['gc_height'];?>cm</li>
									<li>体重：<?php echo $cv['gc_weight'];?>kg</li>
									<li class="isok">
										<<?php echo $cv['gc_tag'];?>>
									</li>
								</ul>
							</div>
							<!--会员信息-->
							<div class="member">
								<p>
									<a href="javascript:;" class="username">

										<?php echo $cv['username'];?>

										<span class="vipIcon"></span>

									</a>
								</p>
							</div>
						</div>
						<?php }?>
						<?php }else{ ?>
						<div style="padding:20px;">目前没有评论</div>
						<?php } ?>
					</div>
					<!--评论分页-->
					<div class="commentPage">
						<?php echo $page2;?>
					</div>
					<!--评论分页结束-->
				</div>
				<!--商品提问区-->
				<div class="qa" id="qa">
					<div class="title">
						最新提问 (共<span class="qaCount"><?php echo $total;?></span>条)
					</div>
					<!--问答头部-->
					<div class="qaTop">
						<a href="javascript:;" class="qaBtn" id="qaBtn">

							我要提问

						</a>
					</div>
					    <?php if(empty($quest)){ ?>
						<div class="qaStr">
							<!--提问内容-->
							<div class="qaStrs">
								目前此商品没有提问
							</div>

						</div>
						<?php }else{ ?>
						<div id="qacontent">
							<?php foreach ($quest as $qk=>$qv){?>
								<!--详细提问列表-->
								<div class="qaStr">
									<!--提问内容-->
									<div class="qaStrs">
										<div class="q">
											<span class="qstr">Q</span> <?php echo hd_substr($qv['username'],6,'***');?>：
										</div>
										<span class="quest"><?php echo $qv['quest_content'];?></span>
										<span class="answer">

								<a href=""></a>

							</span>
										<span class="times"><?php echo date('Y/m/d H:i:s',$qv['quest_time']);?></span>
										<div class="clearfix"></div>
										<!--回复-->
										<div class="a">
											<span class="qstr">A</span> <?php echo $qv['answer'];?>
										</div>
									</div>

								</div>

							<?php }?>
					<?php } ?>
					<div class="qapage" >
						<?php echo $page;?>
					</div>
					</div>
					
					<!--qa分页-->

				</div>
				<!--提问框 -->
				<div class="qaform">
					<div class="title">
						<p>提问:<?php echo $goods['goods']['goods_name'];?></p>
					</div>
					<p class="titlebottom"></p>
					<div class="fromcenter">
						<form action="javascript:;" id="questfrom">
							<input type="hidden" name="goods_gid" id="goods_gid" value="<?php echo $goods['goods']['gid'];?>" />
							<input type="hidden" name="users_uid" value="<?php echo $hd['session']['uid'];?>" />
							<div class="form-group">
								<label for="quesecontent">提问内容:</label>
								<textarea name="quest_content" id="questcontent" placeholder="请输入提问内容"></textarea>
							</div>
							<div class="form-group">
								<label for="">&nbsp;</label>
								<a href="javascript:;" id="dosubmit"></a>
							</div>

						</form>

					</div>

				</div>
			</div>

		</div>
		
		<div id="commentBox"  style="display: none;" class="animated">
			<div class="title">
				<div class="title">
					<p class="ptitle">评论:<?php echo $goods['goods']['goods_name'];?> <a href="javascript:;" id="closewindow">[关闭]</a>
					</p>
				</div>
				<p class="titlebottom"></p>
			</div>
			<div class="frommain">
				<form action="javascript:;" id="commform" >
					<input type="hidden" name="goods_gid" id="goods_gid" value="<?php echo $hd['get']['gid'];?>" />
					<input type="hidden" name="users_uid" id="users_uid" value="<?php echo $hd['session']['uid'];?>" />
					<div class="form-group">
						<label for="gc_height">身高:</label>
						<input type="text" name="gc_height" id="gc_height" value="" placeholder="输入身高" /><span class="unit">单位:CM</span>
					</div>
					<div class="form-group">
						<label for="gc_weight">体重:</label>
						<input type="text" name="gc_weight" id="gc_weight" value="" placeholder="输入体重" /><span class="unit">单位:KG</span>
					</div>
					<div class="form-group">
						<label for="gc_tag">标签:</label>
						<label for="tag1">
							<input id="tag1" type="radio" name="gc_tag" value="尺码合适" checked="checked" />尺码合适</label>
						<label for="tag2">
							<input id="tag2" type="radio" name="gc_tag" value="尺码偏小" />尺码偏小</label>
						<label for="tag3">
							<input id="tag3" type="radio" name="gc_tag" value="尺码偏大" />尺码偏大</label>
						<label for="tag4">
							<input id="tag4" type="radio" name="gc_tag" value="偏色" />偏色</label>
					</div>
					<div class="form-group" style="margin-top:30px;">
						<label for="gc_weight">评论内容:</label>
						<textarea name="gc_content" placeholder="请输入评论内容"></textarea>

					</div>
					<div class="form-group" style="margin-top:60px;">
						<label for="">&nbsp;</label>
						<input type="submit" class="submit" id="commentsubmit" value="" />
					</div>

				</form>
			</div>
		</div>
		<!--内容-->
		<script type="text/javascript">
			$('#commform').validate({
				gc_height:{
					rule:{
						required:true,
						num:'100,300',
					},
					error:{
						required:'请输入您的身高',
						num:'请输入一个数字'
					},
					message:'请输入您的身高',
					success:'输入正确'
				},
				gc_weight:{
					rule:{
						required:true,
						num:'1,300',
					},
					error:{
						required:'请输入您的体重',
						num:'请输入一个数字'
					},
					message:'请输入您的体重',
					success:'输入正确'
				},
				gc_content:{
					rule:{
						required:true,
						minlen:5,
						maxlen:100,
					},
					error:{
						required:'请输入评论内容',
						minlen:'不少于5个字符',
						maxlen:'不大于100个字符',
						
					},
					message:'请输入评论内容',
					success:'输入正确'
				}
			})
		</script>

		<!-- 页脚开始 -->
		<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<div id="foot">
			<div class="footerList">
				<div class="center">
					<dl>
						<dt><a href="">关于凡客</a></dt>
						<dd><a href="">公司简介</a></dd>
						<dd><a href="">联系我们</a></dd>
						<dd><a href="">友情链接</a></dd>
						
					</dl>
					<dl>
						<dt><a href="">新手指南</a></dt>
						<dd><a href="">账户注册</a></dd>
						<dd><a href="">购物流程</a></dd>
						<dd><a href="">网站地图</a></dd>
						<dd><a href="">商家入驻</a></dd>
					</dl>
					<dl>
						<dt><a href="">配送范围及时间</a></dt>
						<dd><a href="">国内配送</a></dd>
						<dd><a href="">订单拆分</a></dd>
						
					</dl>
					<dl>
						<dt><a href="">支付方式</a></dt>
						<dd><a href="">货到付款</a></dd>
						<dd><a href="">在线支付</a></dd>
						<dd><a href="">礼品卡及账户余额</a></dd>
						<dd><a href="">其他支付方式</a></dd>
						
					</dl>
					<dl>
						<dt><a href="">售后服务</a></dt>
						<dd><a href="">退换货政策</a></dd>
						<dd><a href="">退换货办理流程</a></dd>
						<dd><a href="">退换货网上办理</a></dd>
						<dd><a href="">退款说明</a></dd>
						<dd><a href="">调查问卷</a></dd>
						
					</dl>
					<dl style="border:none;">
						<dt><a href="">帮助中心</a></dt>
						<dd><a href="">在线客服</a></dd>
						<dd><a href="">找回密码</a></dd>
						<dd><a href="">隐私声明</a></dd>
						
					</dl>
				</div>
			</div>
			<!--条款图片-->
			<div class="footerListImg">
				<div class="wrapImg">
					<a href="" class="img1"></a>
				</div>
				<div class="wrapImg">
					<a href="" class="img2"></a>
				</div>
				<div class="wrapImg">
					<a href="" class="img3"></a>
				</div>
				<div class="wrapImg">
					<a href="" class="img4"></a>
				</div>
				
			</div>
			<!--条款图片结束-->
			<!--版权信息和工商-->
			<div class="footerBotoom">
				<div class="copy">
					Copyright 2007 - 2014 vancl.com All Rights Reserved 京ICP证100557号 京公网安备11011502002400号 出版物经营许可证新出发京批字第直110138号
				</div>
				<div class="gsImg">
					<div class="wrapFootImg">
					<a href="" class="gsImg1"></a>
					<a href="" class="gsImg2"></a>
					<a href="" class="gsImg3"></a>
					<a href="" class="gsImg4"></a>
					<a href="" class="gsImg5"></a>
					</div>
				</div>
				
			</div>
			<!--版权信息和工商-->
			
		</div>
		<!-- 页脚结束 -->

	</body>

</html>